package com.firemoss.atonement.mapper.resolution
{
	import com.firemoss.atonement.mapper.Mapping;
	import com.firemoss.atonement.metadata.Property;
	import flash.utils.Dictionary;

	/**
	 * A contract to be met for stock value resolvers.  You don't necessarily
	 * need to use an implementation to add a custom property resolver:  see
	 * the "propertyResolutionFunction" property of the PropertyMapping class
	 * for how to use any given function of any class to resolve a property's
	 * value.
	 */
	public interface IValueResolver
	{

		/**
		 * Takes one value.  Returns its resolved value.  A mapper
		 * is passed to allow mapping of object graphs, and the mappingChain contains
		 * what instances have already been resolved during the given map() execution.
		 */
		function resolve( source : *, targetProperty : Property, mapping : Mapping, mappingChain : Dictionary ) : *
	}
}
